# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=msolve
pkgver=0.4.9
pkgrel=1
pkgdesc='Library for polynomial system solving through algebraic methods'
url='https://msolve.lip6.fr/'
arch=(loong64 x86_64)
license=(GPL2)
depends=(flint)
makedepends=()
source=(https://github.com/algebraic-solving/msolve/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('4c5f98e072e1d965607b8b96f25a3cefb6e3da7fffc29b0611f94d946fb0dadb')

prepare() {
  cd $pkgname-$pkgver
  ./autogen.sh
}

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool # Fix overlinking
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
